<template>
    <el-pagination
       @size-change="handleSizeChange"
       @current-change="handleCurrentChange"
       :current-page="currentPage"
       :page-sizes="[10, 20, 30, 40,50,100]"
       :page-size=pageSize
       layout="total, sizes, prev, pager, next, jumper"
       :total="total">
   </el-pagination>
</template>

<script>
/**
* 分页组件
* @param {Number} currentPage 当前处于的页面号
* @param {Number} total  总量
* @param {Number} pageSize  每页展示的数量
* @created 2024-03-26
* @author Xuyun
*/
// 使用 <my-pagination :currentPage="pageNum" :total="total" :pageSize="pageSize" @sizeChange="handleSizeChange" @currentPage="handleCurrentChange"/>
export default {
    name: 'cxyPagination',
   props: {
       currentPage: {
           type: Number,
           default: 1
       },
       total: {
           type: Number,
           default: 0
       },
       pageSize: {
           type: Number,
           default: 10
       }

   },
   data() {
       return {

       }
   },
   methods: {
       handleSizeChange(e) {
           this.$emit('sizeChange', e)
       },
       handleCurrentChange(e) {
           this.$emit('currentChange', e)
       }
   }
}
</script>
<style scoped>

</style>